/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package alcatelparser.tags;

import alcatelparser.modules.AlgoUtil;
import alcatelparser.modules.BuilderFactory;
import alcatelparser.modules.Env;
import alcatelparser.modules.I;

/**
 *
 * @author geniuz
 */
public class RecordTypeTag extends DefaultParserTag
{

    public RecordTypeTag()
    {
    }

    public final void parseTag(int ai[], int i)
    {
        _readBytesCount = 2 + AlgoUtil.getLength(ai, i + 1);
        _array = ai;
        String s = getRecordValue(i + 2);
        String s1 = (new StringBuilder()).append(getTagIdentifyContent(i, i + 1)).append(s).toString();
        if(Env.getEnv().isFullForm())
            BuilderFactory.getBuilder().writeTagContent(3, 0, getTagPropertiesValue(I.I(1386)), s1);
    }

    private String getRecordValue(int i)
    {
        int j = _array[i];
        return j != 0 ? Integer.toHexString(j) : I.I(7064);
    }

    public final String getParseIdentityTag()
    {
        return I.I(5536);
    }

    public final boolean isTagRequired()
    {
        return true;
    }
}
